package com.itcast.mallapplet.controller.user;

import com.itcast.applet.dto.SeckillDTO;
import com.itcast.applet.dto.ShopEvaluateDTO;
import com.itcast.mallapplet.service.ShopEvaluateService;
import com.itcast.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user/shopEvaluate")
@Slf4j
@Api(tags = "用户端-商品评价")
public class ShopEvaluateController {

    @Autowired
    private ShopEvaluateService shopEvaluateService;

    @PostMapping("/add")
    @ApiOperation("商品评价")
    public Result shopEvaluateAdd(@RequestBody ShopEvaluateDTO shopEvaluateDTO) {
        log.info("商品评价信息为: {}",shopEvaluateDTO);
        shopEvaluateService.shopEvaluateAdd(shopEvaluateDTO);
        return Result.success();
    }



}
